#!/bin/bash

external_monitor=$(xrandr --query | grep 'HDMI-0')
internal_monitor=$(xrandr --query | grep 'DP-2')
if [[ $external_monitor = *connected* && $internal_monitor = *connected* ]]; then
    # Cant remember why I tried to do this, maybe explicityly set the position
    # DP-2 is when it's discrete.  eDP-1-1 is when we set the BIOS to hybrid.
    xrandr --output DP-2 --primary --mode 3840x2160 --rotate normal --output HDMI-0 --mode 3840x2160 --rotate normal --right-of DP-2
fi
